home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / digivfo / a06b.doc < prev    next >
Text File  |  1994-04-27  |  26KB  |  445 lines

  1.                                                               6-8
  2.  
  3. Opcodes     Instruction    Description
  4.  
  5. 37          AAA            ASCII adjust AL (carry into AH) after addition
  6. D5 0A       AAD            ASCII adjust before division (AX = 10*AH + AL)
  7. D4 0A       AAM            ASCII adjust after multiply (AL/10: AH=Quo AL=Rem)
  8. 3F          AAS            ASCII adjust AL (borrow from AH) after subtraction
  9.  
  10. 14 ib       ADC AL,ib      Add with carry immediate byte into AL
  11. 15 iw       ADC AX,iw      Add with carry immediate word into AX
  12. 80 /2 ib    ADC eb,ib      Add with carry immediate byte into EA byte
  13. 10 /r       ADC eb,rb      Add with carry byte register into EA byte
  14. 83 /2 ib    ADC ew,ib      Add with carry immediate byte into EA word
  15. 81 /2 iw    ADC ew,iw      Add with carry immediate word into EA word
  16. 11 /r       ADC ew,rw      Add with carry word register into EA word
  17. 12 /r       ADC rb,eb      Add with carry EA byte into byte register
  18. 13 /r       ADC rw,ew      Add with carry EA word into word register
  19.  
  20. 04 ib       ADD AL,ib      Add immediate byte into AL
  21. 05 iw       ADD AX,iw      Add immediate word into AX
  22. 80 /0 ib    ADD eb,ib      Add immediate byte into EA byte
  23. 00 /r       ADD eb,rb      Add byte register into EA byte
  24. 83 /0 ib    ADD ew,ib      Add immediate byte into EA word
  25. 81 /0 iw    ADD ew,iw      Add immediate word into EA word
  26. 01 /r       ADD ew,rw      Add word register into EA word
  27. 02 /r       ADD rb,eb      Add EA byte into byte register
  28. 03 /r       ADD rw,ew      Add EA word into word register
  29. 0F 20      #ADD4S          Add CL nibbles BCD from DS:SI into ES:DI (CL even,NZ)
  30.  
  31. 24 ib       AND AL,ib      Logical-AND immediate byte into AL
  32. 25 iw       AND AX,iw      Logical-AND immediate word into AX
  33. 80 /4 ib    AND eb,ib      Logical-AND immediate byte into EA byte
  34. 20 /r       AND eb,rb      Logical-AND byte register into EA byte
  35. 83 /4 ib    AND ew,ib      Logical-AND immediate byte into EA word
  36. 81 /4 iw    AND ew,iw      Logical-AND immediate word into EA word
  37. 21 /r       AND ew,rw      Logical-AND word register into EA word
  38. 22 /r       AND rb,eb      Logical-AND EA byte into byte register
  39. 23 /r       AND rw,ew      Logical-AND EA word into word register
  40. 63 /r      *ARPL ew,rw     Adjust RPL of EA word not smaller than RPL of rw
  41.  
  42. 62 /r      *BOUND rw,md    INT 5 if rw not between [md] and [md+2] inclusive
  43. 9A cd       CALL cd        Call far segment, immediate 4-byte address
  44. E8 cw       CALL cw        Call near, offset relative to next instruction
  45. FF /3       CALL ed        Call far segment, address at EA doubleword
  46. FF /2       CALL ew        Call near, offset absolute at EA word
  47. 0F FF ib   #CALL80 ib      Call 8080-emulation code at INT number ib
  48.  
  49. 98          CBW            Convert byte into word (AH = top bit of AL)
  50. F8          CLC            Clear carry flag
  51. FC          CLD            Clear direction flag so SI and DI will increment
  52. FA          CLI            Clear interrupt enable flag; interrupts disabled
  53.  
  54. 0F 12/0    #CLRBIT eb,CL   Clear bit CL of eb
  55. 0F 13/0    #CLRBIT ew,CL   Clear bit CL of ew
  56. 0F 1A/0 ib #CLRBIT eb,ib   Clear bit ib of eb
  57. 0F 1B/0 ib #CLRBIT ew,ib   Clear bit ib of ew
  58. 0F 06      *CLTS           Clear task switched flag
  59. F5          CMC            Complement carry flag
  60.                                                               6-9
  61.  
  62. 3C ib       CMP AL,ib      Subtract immediate byte from AL for flags only
  63. 3D iw       CMP AX,iw      Subtract immediate word from AX for flags only
  64. 80 /7 ib    CMP eb,ib      Subtract immediate byte from EA byte for flags only
  65. 38 /r       CMP eb,rb      Subtract byte register from EA byte for flags only
  66. 83 /7 ib    CMP ew,ib      Subtract immediate byte from EA word for flags only
  67. 81 /7 iw    CMP ew,iw      Subtract immediate word from EA word for flags only
  68. 39 /r       CMP ew,rw      Subtract word register from EA word for flags only
  69. 3A /r       CMP rb,eb      Subtract EA byte from byte register for flags only
  70. 3B /r       CMP rw,ew      Subtract EA word from word register for flags only
  71.  
  72. 0F 26      #CMP4S          Compare CL nibbles CD at DS:SI from ES:DI (CL even,NZ)
  73. A6          CMPS mb,mb     Compare bytes ES:[DI] from [SI], advance SI and DI
  74. A7          CMPS mw,mw     Compare words ES:[DI] from [SI], advance SI and DI
  75. A6          CMPSB          Compare bytes ES:[DI] from DS:[SI], advance SI and DI
  76. A7          CMPSW          Compare words ES:[DI] from DS:[SI], advance SI and DI
  77. 99          CWD            Convert word to doubleword (DX = top bit of AX)
  78.  
  79. 27          DAA            Decimal adjust AL after addition
  80. 2F          DAS            Decimal adjust AL after subtraction
  81. FE /1       DEC eb         Decrement EA byte by 1
  82. FF /1       DEC ew         Decrement EA word by 1
  83. 48+rw       DEC rw         Decrement word register by 1
  84.  
  85. F6 /6       DIV eb         Unsigned divide AX by EA byte (AL=Quo AH=Rem)
  86. F7 /6       DIV ew         Unsigned divide DXAX by EA word (AX=Quo DX=Rem)
  87.  
  88. C8 iw 00   *ENTER iw,0     Make stack frame, iw bytes local storage, 0 levels
  89. C8 iw 01   *ENTER iw,1     Make stack frame, iw bytes local storage, 1 level
  90. C8 iw ib   *ENTER iw,ib    Make stack frame, iw bytes local storage, ib levels
  91.             Fany           Floating point set is in Chapter 7
  92. F4          HLT            Halt
  93.  
  94. F6 /7       IDIV eb        Signed divide AX by EA byte (AL=Quo AH=Rem)
  95. F7 /7       IDIV ew        Signed divide DXAX by EA word (AX=Quo DX=Rem)
  96. F6 /5       IMUL eb        Signed multiply (AX = AL * EA byte)
  97. F7 /5       IMUL ew        Signed multiply (DXAX = AX * EA word)
  98. 6B /r ib   *IMUL rw,ib     Signed multiply immediate byte into word register
  99. 69 /r iw   *IMUL rw,iw     Signed multiply immediate word into word register
  100. 69 /r iw   *IMUL rw,ew,iw  Signed multiply (rw = EA word * immediate word)
  101. 6B /r ib   *IMUL rw,ew,ib  Signed multiply (rw = EA word * immediate byte)
  102.  
  103. E4 ib       IN AL,ib       Input byte from immediate port into AL
  104. EC          IN AL,DX       Input byte from port DX into AL
  105. E5 ib       IN AX,ib       Input word from immediate port into AX
  106. ED          IN AX,DX       Input word from port DX into AX
  107.  
  108. FE /0       INC eb         Increment EA byte by 1
  109. FF /0       INC ew         Increment EA word by 1
  110. 40+rw       INC rw         Increment word register by 1
  111.  
  112. 6C         *INS eb,DX      Input byte from port DX into [DI], advance DI
  113. 6D         *INS ew,DX      Input word from port DX into [DI], advance DI
  114. 6C         *INSB           Input byte from port DX into ES:[DI], advance DI
  115. 6D         *INSW           Input word from port DX into ES:[DI], advance DI
  116.                                                              6-10
  117.  
  118. CC          INT 3          Interrupt 3 (trap to debugger) (far call, with flags
  119. CD ib       INT ib         Interrupt numbered by immediate byte     pushed first)
  120. CE          INTO           Interrupt 4 if overflow flag is 1
  121. CF          IRET           Interrupt return (far return and pop flags)
  122.  
  123. 77 cb       JA cb          Jump short if above (CF=0 and ZF=0)    above=UNSIGNED
  124. 73 cb       JAE cb         Jump short if above or equal (CF=0)
  125. 72 cb       JB cb          Jump short if below (CF=1)             below=UNSIGNED
  126. 76 cb       JBE cb         Jump short if below or equal (CF=1 or ZF=1)
  127. 72 cb       JC cb          Jump short if carry (CF=1)
  128.  
  129. E3 cb       JCXZ cb        Jump short if CX register is zero
  130. 74 cb       JE cb          Jump short if equal (ZF=1)
  131. 7F cb       JG cb          Jump short if greater (ZF=0 and SF=OF)  greater=SIGNED
  132. 7D cb       JGE cb         Jump short if greater or equal (SF=OF)
  133. 7C cb       JL cb          Jump short if less (SF/=OF)                less=SIGNED
  134. 7E cb       JLE cb         Jump short if less or equal (ZF=1 or SF/=OF)
  135.  
  136. EB cb       JMP cb         Jump short (signed byte relative to next instruction)
  137. EA cd       JMP cd         Jump far (4-byte immediate address)
  138. E9 cw       JMP cw         Jump near (word offset relative to next instruction)
  139. FF /4       JMP ew         Jump near to EA word (absolute offset)
  140. FF /5       JMP md         Jump far (4-byte address in memory doubleword)
  141.  
  142. 76 cb       JNA cb         Jump short if not above (CF=1 or ZF=1)
  143. 72 cb       JNAE cb        Jump short if not above or equal (CF=1)
  144. 73 cb       JNB cb         Jump short if not below (CF=0)
  145. 77 cb       JNBE cb        Jump short if not below or equal (CF=0 and ZF=0)
  146. 73 cb       JNC cb         Jump short if not carry (CF=0)
  147.  
  148. 75 cb       JNE cb         Jump short if not equal (ZF=0)
  149. 7E cb       JNG cb         Jump short if not greater (ZF=1 or SF/=OF)
  150. 7C cb       JNGE cb        Jump short if not greater or equal (SF/=OF)
  151. 7D cb       JNL cb         Jump short if not less (SF=OF)
  152. 7F cb       JNLE cb        Jump short if not less or equal (ZF=0 and SF=OF)
  153.  
  154. 71 cb       JNO cb         Jump short if not overflow (OF=0)
  155. 7B cb       JNP cb         Jump short if not parity (PF=0)
  156. 79 cb       JNS cb         Jump short if not sign (SF=0)
  157. 75 cb       JNZ cb         Jump short if not zero (ZF=0)
  158. 70 cb       JO cb          Jump short if overflow (OF=1)
  159.  
  160. 7A cb       JP cb          Jump short if parity (PF=1)
  161. 7A cb       JPE cb         Jump short if parity even (PF=1)
  162. 7B cb       JPO cb         Jump short if parity odd (PF=0)
  163. 78 cb       JS cb          Jump short if sign (SF=1)
  164. 74 cb       JZ cb          Jump short if zero (ZF=1)
  165.  
  166. 9F          LAHF           Load: AH = flags  SF ZF xx AF xx PF xx CF
  167. 0F 02 /r   *LAR rw,ew      Load: high(rw) = Access Rights byte, selector ew
  168. C5 /r       LDS rw,ed      Load EA doubleword into DS and word register
  169. 8D /r       LEA rw,m       Calculate EA offset given by m, place in rw
  170. C9         *LEAVE          Set SP to BP, then POP BP (reverses previous ENTER)
  171. C4 /r       LES rw,ed      Load EA doubleword into ES and word register
  172.                                                              6-11
  173.  
  174. 0F 01 /2   *LGDT m         Load 6 bytes at m into Global Descriptor Table reg
  175. 0F 01 /3   *LIDT m         Load 6 bytes at m into Interrupt Descriptor Table reg
  176. 0F 00 /2   *LLDT ew        Load selector ew into Local Descriptor Table reg
  177. 0F 01 /6   *LMSW ew        Load EA word into Machine Status Word
  178. F0          LOCK (prefix)  Assert BUSLOCK signal for the next instruction
  179.  
  180. 0F 33/r    #LODBITS rb,rb  Load AX with DS:SI,bit rb (incr. SI,rb), rb+1 bits
  181. 0F 3B/0 ib #LODBITS rb,ib  Load AX with DS:SI,bit rb (incr. SI,rb), ib+1 bits
  182. AC          LODS mb        Load byte [SI] into AL, advance SI
  183. AD          LODS mw        Load word [SI] into AX, advance SI
  184. AC          LODSB          Load byte [SI] into AL, advance SI
  185. AD          LODSW          Load word [SI] into AX, advance SI
  186.  
  187. E2 cb       LOOP cb        noflags DEC CX; jump short if CX/=0
  188. E1 cb       LOOPE cb       noflags DEC CX; jump short if CX/=0 and equal (ZF=1)
  189. E0 cb       LOOPNE cb      noflags DEC CX; jump short if CX/=0 and not equal
  190. E0 cb       LOOPNZ cb      noflags DEC CX; jump short if CX/=0 and ZF=0
  191. E1 cb       LOOPZ cb       noflags DEC CX; jump short if CX/=0 and zero (ZF=1)
  192.  
  193. 0F 03 /r   *LSL rw,ew      Load: rw = Segment Limit, selector ew
  194. 0F 00 /3   *LTR ew         Load EA word into Task Register
  195.  
  196. A0 iw       MOV AL,xb      Move byte variable (offset iw) into AL
  197. A1 iw       MOV AX,xw      Move word variable (offset iw) into AX
  198. 8E /3       MOV DS,mw      Move memory word into DS
  199. 8E /3       MOV DS,rw      Move word register into DS
  200.  
  201. C6 /0 ib    MOV eb,ib      Move immediate byte into EA byte
  202. 88 /r       MOV eb,rb      Move byte register into EA byte
  203. 8E /0       MOV ES,mw      Move memory word into ES
  204. 8E /0       MOV ES,rw      Move word register into ES
  205.  
  206. 8C /1       MOV ew,CS      Move CS into EA word
  207. 8C /3       MOV ew,DS      Move DS into EA word
  208. C7 /0 iw    MOV ew,iw      Move immediate word into EA word
  209. 8C /0       MOV ew,ES      Move ES into EA word
  210. 89 /r       MOV ew,rw      Move word register into EA word
  211.  
  212. 8C /2       MOV ew,SS      Move SS into EA word
  213. B0+rb ib    MOV rb,ib      Move immediate byte into byte register
  214. 8A /r       MOV rb,eb      Move EA byte into byte register
  215. B8+rw iw    MOV rw,iw      Move immediate word into word register
  216. 8B /r       MOV rw,ew      Move EA word into word register
  217.  
  218. 8E /2       MOV SS,mw      Move memory word into SS
  219. 8E /2       MOV SS,rw      Move word register into SS
  220. A2 iw       MOV xb,AL      Move AL into byte variable (offset iw)
  221. A3 iw       MOV xw,AX      Move AX into word register (offset iw)
  222. A4          MOVS mb,mb     Move byte [SI] to ES:[DI], advance SI and DI
  223. A5          MOVS mw,mw     Move word [SI] to ES:[DI], advance SI and DI
  224. A4          MOVSB          Move byte DS:[SI] to ES:[DI], advance SI and DI
  225. A5          MOVSW          Move word DS:[SI] to ES:[DI], advance SI and DI
  226. F6 /4       MUL eb         Unsigned multiply (AX = AL * EA byte)
  227. F7 /4       MUL ew         Unsigned multiply (DXAX = AX * EA word)
  228.                                                              6-12
  229.  
  230. F6 /3       NEG eb         Two's complement negate EA byte
  231. F7 /3       NEG ew         Two's complement negate EA word
  232.             NIL (prefix)   Special "do-nothing" opcode assembles no code
  233. 90          NOP            No Operation
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240. F6 /2       NOT eb         Reverse each bit of EA byte
  241. F7 /2       NOT ew         Reverse each bit of EA word
  242. 0F 16/0    #NOTBIT eb,CL   Complement bit CL of eb
  243. 0F 17/0    #NOTBIT ew,CL   Complement bit CL of ew
  244. 0F 1E/0 ib #NOTBIT eb,ib   Complement bit ib of eb
  245. 0F 1F/0 ib #NOTBIT ew,ib   Complement bit ib of ew
  246.  
  247. 0C ib       OR AL,ib       Logical-OR immediate byte into AL
  248. 0D iw       OR AX,iw       Logical-OR immediate word into AX
  249. 80 /1 ib    OR eb,ib       Logical-OR immediate byte into EA byte
  250. 08 /r       OR eb,rb       Logical-OR byte register into EA byte
  251. 83 /1 ib    OR ew,ib       Logical-OR immediate byte into EA word
  252. 81 /1 iw    OR ew,iw       Logical-OR immediate word into EA word
  253. 09 /r       OR ew,rw       Logical-OR word register into EA word
  254. 0A /r       OR rb,eb       Logical-OR EA byte into byte register
  255. 0B /r       OR rw,ew       Logical-OR EA word into word register
  256.  
  257. E6 ib       OUT ib,AL      Output byte AL to immediate port number ib
  258. E7 ib       OUT ib,AX      Output word AX to immediate port number ib
  259. EE          OUT DX,AL      Output byte AL to port number DX
  260. EF          OUT DX,AX      Output word AX to port number DX
  261. 6E         *OUTS DX,eb     Output byte [SI] to port number DX, advance SI
  262. 6F         *OUTS DX,ew     Output word [SI] to port number DX, advance SI
  263. 6E         *OUTSB          Output byte DS:[SI] to port number DX, advance SI
  264. 6F         *OUTSW          Output word DS:[SI] to port number DX, advance SI
  265.  
  266. 1F          POP DS         Set DS to top of stack, increment SP by 2
  267. 07          POP ES         Set ES to top of stack, increment SP by 2
  268. 8F /0       POP mw         Set memory word to top of stack, increment SP by 2
  269. 58+rw       POP rw         Set word register to top of stack, increment SP by 2
  270. 17          POP SS         Set SS to top of stack, increment SP by 2
  271. 61         *POPA           Pop DI,SI,BP,SP,BX,DX,CX,AX (SP value is ignored)
  272. 9D          POPF           Set flags register to top of stack, increment SP by 2
  273.  
  274. 0E          PUSH CS        Set [SP-2] to CS, then decrement SP by 2
  275. 1E          PUSH DS        Set [SP-2] to DS, then decrement SP by 2
  276. 06          PUSH ES        Set [SP-2] to ES, then decrement SP by 2
  277. 6A ib      *PUSH ib        Push sign-extended immediate byte
  278. 68 iw      *PUSH iw        Set [SP-2] to immediate word, then decrement SP by 2
  279. FF /6       PUSH mw        Set [SP-2] to memory word, then decrement SP by 2
  280. 50+rw       PUSH rw        Set [SP-2] to word register, then decrement SP by 2
  281. 16          PUSH SS        Set [SP-2] to SS, then decrement SP by 2
  282. 60         *PUSHA          Push AX,CX,DX,BX,original SP,BP,SI,DI
  283. 9C          PUSHF          Set [SP-2] to flags register, then decrement SP by 2
  284.                                                              6-13
  285.  
  286. D0 /2       RCL eb,1       Rotate 9-bit quantity (CF, EA byte) left once
  287. D2 /2       RCL eb,CL      Rotate 9-bit quantity (CF, EA byte) left CL times
  288. C0 /2 ib   *RCL eb,ib      Rotate 9-bit quantity (CF, EA byte) left ib times
  289. D1 /2       RCL ew,1       Rotate 17-bit quantity (CF, EA word) left once
  290. D3 /2       RCL ew,CL      Rotate 17-bit quantity (CF, EA word) left CL times
  291. C1 /2 ib   *RCL ew,ib      Rotate 17-bit quantity (CF, EA word) left ib times
  292.  
  293. D0 /3       RCR eb,1       Rotate 9-bit quantity (CF, EA byte) right once
  294. D2 /3       RCR eb,CL      Rotate 9-bit quantity (CF, EA byte) right CL times
  295. C0 /3 ib   *RCR eb,ib      Rotate 9-bit quantity (CF, EA byte) right ib times
  296. D1 /3       RCR ew,1       Rotate 17-bit quantity (CF, EA word) right once
  297. D3 /3       RCR ew,CL      Rotate 17-bit quantity (CF, EA word) right CL times
  298. C1 /3 ib   *RCR ew,ib      Rotate 17-bit quantity (CF, EA word) right ib times
  299.  
  300. F3          REP (prefix)   Repeat following MOVS,LODS,STOS,INS, or OUTS CX times
  301. 65         #REPC (prefix)  Repeat following CMPS or SCAS CX times or until CF=0
  302. F3          REPE (prefix)  Repeat following CMPS or SCAS CX times or until ZF=0
  303. 64         #REPNC (prfix)  Repeat following CMPS or SCAS CX times or until CF=1
  304. F2          REPNE (prfix)  Repeat following CMPS or SCAS CX times or until ZF=1
  305. F2          REPNZ (prfix)  Repeat following CMPS or SCAS CX times or until ZF=1
  306. F3          REPZ (prefix)  Repeat following CMPS or SCAS CX times or until ZF=0
  307.  
  308. CB          RETF           Return to far caller (pop offset, then seg)
  309. C3          RET            Return to near caller (pop offset only)
  310. CA iw       RETF iw        RET (far), pop offset, seg, iw bytes
  311. C2 iw       RET iw         RET (near), pop offset, iw bytes pushed before Call
  312.  
  313. D0 /0       ROL eb,1       Rotate 8-bit EA byte left once
  314. D2 /0       ROL eb,CL      Rotate 8-bit EA byte left CL times
  315. C0 /0 ib   *ROL eb,ib      Rotate 8-bit EA byte left ib times
  316. D1 /0       ROL ew,1       Rotate 16-bit EA word left once
  317. D3 /0       ROL ew,CL      Rotate 16-bit EA word left CL times
  318. C1 /0 ib   *ROL ew,ib      Rotate 16-bit EA word left ib times
  319. 0F 28/0    #ROL4 eb        Rotate nibbles: Heb=Leb   HAL,Leb=LAL  LAL=Heb
  320.  
  321. D0 /1       ROR eb,1       Rotate 8-bit EA byte right once
  322. D2 /1       ROR eb,CL      Rotate 8-bit EA byte right CL times
  323. C0 /1 ib   *ROR eb,ib      Rotate 8-bit EA byte right ib times
  324. D1 /1       ROR ew,1       Rotate 16-bit EA word right once
  325. D3 /1       ROR ew,CL      Rotate 16-bit EA word right CL times
  326. C1 /1 ib   *ROR ew,ib      Rotate 16-bit EA word right ib times
  327. 0F 2A/0    #ROR4 eb        Rotate nibbles: Leb=Heb   Heb=LAL  AL=eb
  328.  
  329. 9E          SAHF           Store AH into flags  SF ZF xx AF xx PF xx CF
  330. D0 /4       SAL eb,1       Multiply EA byte by 2, once
  331. D2 /4       SAL eb,CL      Multiply EA byte by 2, CL times
  332. C0 /4 ib   *SAL eb,ib      Multiply EA byte by 2, ib times
  333. D1 /4       SAL ew,1       Multiply EA word by 2, once
  334. D3 /4       SAL ew,CL      Multiply EA word by 2, CL times
  335. C1 /4 ib   *SAL ew,ib      Multiply EA word by 2, ib times
  336.  
  337. D0 /7       SAR eb,1       Signed divide EA byte by 2, once
  338. D2 /7       SAR eb,CL      Signed divide EA byte by 2, CL times
  339. C0 /7 ib   *SAR eb,ib      Signed divide EA byte by 2, ib times
  340. D1 /7       SAR ew,1       Signed divide EA word by 2, once
  341. D3 /7       SAR ew,CL      Signed divide EA word by 2, CL times
  342. C1 /7 ib   *SAR ew,ib      Signed divide EA word by 2, ib times
  343.                                                              6-14
  344.  
  345. 1C ib       SBB AL,ib      Subtract with borrow immediate byte from AL
  346. 1D iw       SBB AX,iw      Subtract with borrow immediate word from AX
  347. 80 /3 ib    SBB eb,ib      Subtract with borrow immediate byte from EA byte
  348. 18 /r       SBB eb,rb      Subtract with borrow byte register from EA byte
  349. 83 /3 ib    SBB ew,ib      Subtract with borrow immediate byte from EA word
  350. 81 /3 iw    SBB ew,iw      Subtract with borrow immediate word from EA word
  351. 19 /r       SBB ew,rw      Subtract with borrow word register from EA word
  352. 1A /r       SBB rb,eb      Subtract with borrow EA byte from byte register
  353. 1B /r       SBB rw,ew      Subtract with borrow EA word from word register
  354.  
  355. AE          SCAS mb        Compare bytes AL - ES:[DI], advance DI
  356. AF          SCAS mw        Compare words AL - ES:[DI], advance DI
  357. AE          SCASB          Compare bytes AX - ES:[DI], advance DI
  358. AF          SCASW          Compare words AX - ES:[DI], advance DI
  359.  
  360. 0F 14/0    #SETBIT eb,CL   Set bit CL of eb
  361. 0F 15/0    #SETBIT ew,CL   Set bit CL of ew
  362. 0F 1C/0 ib #SETBIT eb,ib   Set bit ib of eb
  363. 0F 1D/0 ib #SETBIT ew,ib   Set bit ib of ew
  364. 0F 01 /0   *SGDT m         Store 6-byte Global Descriptor Table register to M
  365.  
  366. D0 /4       SHL eb,1       Multiply EA byte by 2, once
  367. D2 /4       SHL eb,CL      Multiply EA byte by 2, CL times
  368. C0 /4 ib   *SHL eb,ib      Multiply EA byte by 2, ib times
  369. D1 /4       SHL ew,1       Multiply EA word by 2, once
  370. D3 /4       SHL ew,CL      Multiply EA word by 2, CL times
  371. C1 /4 ib   *SHL ew,ib      Multiply EA word by 2, ib times
  372. D0 /5       SHR eb,1       Unsigned divide EA byte by 2, once
  373. D2 /5       SHR eb,CL      Unsigned divide EA byte by 2, CL times
  374. C0 /5 ib   *SHR eb,ib      Unsigned divide EA byte by 2, ib times
  375. D1 /5       SHR ew,1       Unsigned divide EA word by 2, once
  376. D3 /5       SHR ew,CL      Unsigned divide EA word by 2, CL times
  377. C1 /5 ib   *SHR ew,ib      Unsigned divide EA word by 2, ib times
  378.  
  379. 0F 01 /1   *SIDT m         Store 6-byte Interrupt Descriptor Table register to M
  380. 0F 00 /0   *SLDT ew        Store Local Descriptor Table register to EA word
  381. 0F 01 /4   *SMSW ew        Store Machine Status Word to EA word
  382. F9          STC            Set carry flag
  383. FD          STD            Set direction flag so SI and DI will decrement
  384. FB          STI            Set interrupt enable flag, interrupts enabled
  385.  
  386. 0F 31/r    #STOBITS rb,rb  Store AX to ES:DI,bit rb (incr. DI,rb), rb+1 bits
  387. 0F 39/0 ib #STOBITS rb,ib  Store AX to ES:DI,bit rb (incr. DI,rb), ib+1 bits
  388. AA          STOS mb        Store AL to byte [DI], advance DI
  389. AB          STOS mw        Store AX to word [DI], advance DI
  390. AA          STOSB          Store AL to byte ES:[DI], advance DI
  391. AB          STOSW          Store AX to word ES:[DI], advance DI
  392. 0F 00 /1   *STR ew         Store Task Register to EA word
  393.                                                              6-15
  394.  
  395. 2C ib       SUB AL,ib      Subtract immediate byte from AL
  396. 2D iw       SUB AX,iw      Subtract immediate word from AX
  397. 80 /5 ib    SUB eb,ib      Subtract immediate byte from EA byte
  398. 28 /r       SUB eb,rb      Subtract byte register from EA byte
  399. 83 /5 ib    SUB ew,ib      Subtract immediate byte from EA word
  400. 81 /5 iw    SUB ew,iw      Subtract immediate word from EA word
  401. 29 /r       SUB ew,rw      Subtract word register from EA word
  402. 2A /r       SUB rb,eb      Subtract EA byte from byte register
  403. 2B /r       SUB rw,ew      Subtract EA word from word register
  404. 0F 22      #SUB4S          Sub CL nibbles BCD at DS:SI from ES:DI (CL even,NZ)
  405.  
  406. A8 ib       TEST AL,ib     AND immediate byte into AL for flags only
  407. A9 iw       TEST AX,iw     AND immediate word into AX for flags only
  408. F6 /0 ib    TEST eb,ib     AND immediate byte into EA byte for flags only
  409. 84 /r       TEST eb,rb     AND byte register into EA byte for flags only
  410. F7 /0 iw    TEST ew,iw     AND immediate word into EA word for flags only
  411. 85 /r       TEST ew,rw     AND word register into EA word for flags only
  412. 84 /r       TEST rb,eb     AND EA byte into byte register for flags only
  413. 85 /r       TEST rw,ew     AND EA word into word register for flags only
  414.  
  415. 0F 10/0    #TESTBIT eb,CL  Test bit CL of eb, set Z flag
  416. 0F 11/0    #TESTBIT ew,CL  Test bit CL of ew, set Z flag
  417. 0F 18/0 ib #TESTBIT eb,ib  Test bit ib of eb, set Z flag
  418. 0F 19/0 ib #TESTBIT ew,ib  Test bit ib of ew, set Z flag
  419. 9B          WAIT           Wait until BUSY pin is inactive (HIGH)
  420. 0F 00 /4   *VERR ew        Set ZF=1 if segment can be read, selector ew
  421. 0F 00 /5   *VERW ew        Set ZF=1 if segment can be written to, selector ew
  422.  
  423. 9r          XCHG AX,rw     Exchange word register with AX
  424. 86 /r       XCHG eb,rb     Exchange byte register with EA byte
  425. 87 /r       XCHG ew,rw     Exchange word register with EA word
  426. 86 /r       XCHG rb,eb     Exchange EA byte with byte register
  427. 9r          XCHG rw,AX     Exchange  with word register
  428. 87 /r       XCHG rw,ew     Exchange EA word with word register
  429.  
  430. D7          XLAT mb        Set AL to memory byte [BX + unsigned AL]
  431. D7          XLATB          Set AL to memory byte DS:[BX + unsigned AL]
  432. 34 ib       XOR AL,ib      Exclusive-OR immediate byte into AL
  433. 35 iw       XOR AX,iw      Exclusive-OR immediate word into AX
  434. 80 /6 ib    XOR eb,ib      Exclusive-OR immediate byte into EA byte
  435. 30 /r       XOR eb,rb      Exclusive-OR byte register into EA byte
  436. 83 /6 ib    XOR ew,ib      Exclusive-OR immediate byte into EA word
  437. 81 /6 iw    XOR ew,iw      Exclusive-OR immediate word into EA word
  438. 31 /r       XOR ew,rw      Exclusive-OR word register into EA word
  439. 32 /r       XOR rb,eb      Exclusive-OR EA byte into byte register
  440. 33 /r       XOR rw,ew      Exclusive-OR EA word into word register
  441.  
  442. *  Starred forms will not execute on 8086/8088!  See note at top of chart.
  443. #  These instructions work only on NEC chips!  See note at top of chart.
  444.  
  445.